void ViewTopo(
        //const char* filename="MergedOutput.root")
        const char* filename="OutputPythia.root")

{
    t=new TFile(filename);
    //TList *l = t->Get("outputPhi");
    TList *l = t->Get("MCtrueOutputPhi");
    HistTopo = new TH2F("HistTopo", "Topology of QQ Correlation Pythia TRUE pp 7 Tev", 8, -TMath::Pi()/2, 5*TMath::Pi()/4, 8, 0, 1.6); //PhiConf, EtaConf
    //HistTopo->GetXaxis()->SetTitle("Phi Configuration = Phi Gap");
    //HistTopo->GetYaxis()->SetTitle("Eta Configuration");

    for (Int_t EtaConf=1; EtaConf<=7; EtaConf++)
        for (Int_t PhiConf=1; PhiConf<=6; PhiConf++)

        {
            THnSparseF* hbase= (THnSparseF*) l->FindObject(Form("fPhi1%dEta%d",PhiConf,EtaConf));
            TH2D* qq=hbase->Projection(6,7,"");
            TH1D* qqcf=(TH1D*)qq->ProfileX("");
            qqcf->Fit("pol1","");
            Double_t b=qqcf->GetFunction("pol1")->GetParameter(1);
            //Double_t be=qqcf->GetFunction("pol1")->GetParError(1);
            HistTopo->SetBinContent(PhiConf+2, EtaConf+1, b);

        }

    for (Int_t EtaConf=0;EtaConf<1;EtaConf++)
        for (Int_t PhiConf=2; PhiConf<=6; PhiConf++)
        {
            THnSparseF* hbase= (THnSparseF*) l->FindObject(Form("fPhi1%dEta0",PhiConf));
            TH2D* qq=hbase->Projection(6,7,"");
            TH1D* qqcf=(TH1D*)qq->ProfileX("");
            qqcf->Fit("pol1","");
            Double_t b=qqcf->GetFunction("pol1")->GetParameter(1);
            //Double_t be=qqcf->GetFunction("pol1")->GetParError(1);
            HistTopo->SetBinContent(PhiConf+2, EtaConf+1, b);


        }

    HistTopo->SetBinContent(3,1,HistTopo->GetBinContent(3,2));


    for (Int_t EtaConf=0; EtaConf<=7; EtaConf++)
        for (Int_t PhiConf=7; PhiConf<=8; PhiConf++)

        {
            THnSparseF* hbase= (THnSparseF*) l->FindObject(Form("fPhi1%dEta%d",PhiConf,EtaConf));
            TH2D* qq=hbase->Projection(6,7,"");
            TH1D* qqcf=(TH1D*)qq->ProfileX("");
            qqcf->Fit("pol1","");
            Double_t b=qqcf->GetFunction("pol1")->GetParameter(1);
            //Double_t be=qqcf->GetFunction("pol1")->GetParError(1);
            HistTopo->SetBinContent(PhiConf-6, EtaConf+1, b);

        }




    //inverting HistTopo:
//    for (Int_t EtaConf=1; EtaConf<=8; EtaConf++)
//        for (Int_t PhiConf=1; PhiConf<=8; PhiConf++)

//        {

//            HistTopo->SetBinContent(PhiConf, EtaConf, -1*(HistTopo->GetBinContent(PhiConf,EtaConf)));

//        }

    gROOT->SetStyle("Plain");
    gStyle->SetPalette(1);

    HistTopo->Draw("SURF1");

    return;

}
